package com.cloudptt.api.product.func.call.group;

import com.cloudptt.api.product.func.call.CallAttr;
import com.cloudptt.api.product.func.call.group.fsm.video.GroupCallMemberInfo;
import com.mcptt.db.model.AddrInfo;

import java.util.List;


public class HalfCallInfo {
	public static final int InfoType_Group = 1;
	public static final int InfoType_Webrtc = 2;
	
	private CallAttr callAttr = null;
	private int callState;
	private int mediaState;
	private boolean hasVideo = false;
	private int floorState;
	private AddrInfo floorUserInfo;
	private int videoTransState;
	private int videoRecvState;
	private List<GroupCallMemberInfo> groupCallMemberInfoList = null;

	public HalfCallInfo(CallAttr callAttr, int callState, int mediaState, boolean hasVideo, int floorState, AddrInfo speaker, int videoTransState, int videoRecvState, List<GroupCallMemberInfo> groupCallMemberInfoList)
	{
		this.callAttr = callAttr;
		this.callState = callState;
		this.mediaState = mediaState;
		this.hasVideo = hasVideo;
		this.floorState = floorState;
		this.floorUserInfo = speaker;
		this.videoTransState = videoTransState;
		this.videoRecvState = videoRecvState;
		this.groupCallMemberInfoList = groupCallMemberInfoList;
	}
	
	public CallAttr getCallAttr() {
		return callAttr;
	}
	public int getFloorState() {
		return floorState;
	}
	public AddrInfo getFloorUserInfo() {
		return floorUserInfo;
	}

	public int getVideoTransState() {
		return videoTransState;
	}

	public int getCallState() {
		return callState;
	}
	public int getMediaState() {
		return mediaState;
	}
	public boolean isHasVideo() {
		return hasVideo;
	}
	public int getVideoRecvState() {
		return videoRecvState;
	}

	public List<GroupCallMemberInfo> getGroupCallMemberInfoList() {
		return groupCallMemberInfoList;
	}
	public String toString()
	{
		StringBuffer strBuff = new StringBuffer("HalfCallInfo:");
		strBuff.append("callState = ").append(callState).append(",");
		strBuff.append("speakState = ").append(floorState).append(",");
		strBuff.append("floorUserInfo = ").append(floorUserInfo).append(",");
		strBuff.append("videoTransState = ").append(videoTransState).append(",");
		strBuff.append("videoRecvState = ").append(videoRecvState).append(",");
		strBuff.append("groupCallMemberInfoList = ").append(groupCallMemberInfoList).append(";");
		return strBuff.toString();
	}
}
